#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
    string s;
    getline(cin, s);
    vector<string> w;
    string word = "";
    for (char c : s) {
        if (c == ' ') {
            w.push_back(word);
            word = "";
        } else {
            word += c;
        }
    }
    w.push_back(word);

    vector<string> l = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"};

    if (w.size() == 3) {
        for (string i : w) {
            bool found = false;
            for (string j : l) {
                if (i == j) {
                    found = true;
                    break;
                }
            }
            if (!found) {
                if (i == "one") {
                    cout << "1" << flush;
                } else if (i == "two") {
                    cout << "2" << flush;
                } else if (i == "three") {
                    cout << "3" << flush;
                } else if (i == "four") {
                    cout << "4" << flush;
                } else if (i == "five") {
                    cout << "5" << flush;
                } else if (i == "six") {
                    cout << "6" << flush;
                } else if (i == "seven") {
                    cout << "7" << flush;
                } else if (i == "eight") {
                    cout << "8" << flush;
                } else if (i == "nine") {
                    cout << "9" << flush;
                } else if (i == "zero") {
                    cout << "0" << flush;
                }
            } 
            else {
                cout << "Wrong input" << endl;
                break;
            }
        }
    } 
    else {
        cout << "Wrong input" << endl;
    }

    return 0;
}